package com.ruslan.magaz.domain;
// default package
// Generated 30.09.2014 22:52:58 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Specificaionname generated by hbm2java
 */
@Entity
@Table(name = "SpecificaionName", catalog = "eshop")
public class SpecificationName implements java.io.Serializable {

	private Integer specificaionNameId;
	private String name;
	private Set<Specification> specifications = new HashSet<Specification>(0);

	public SpecificationName() {
	}

	public SpecificationName(String name, Set<Specification> specifications) {
		this.name = name;
		this.specifications = specifications;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "SpecificaionName_id", unique = true, nullable = false)
	public Integer getSpecificaionNameId() {
		return this.specificaionNameId;
	}

	public void setSpecificaionNameId(Integer specificaionNameId) {
		this.specificaionNameId = specificaionNameId;
	}

	@Column(name = "Name", length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "specificationName")
	public Set<Specification> getSpecifications() {
		return this.specifications;
	}

	public void setSpecifications(Set<Specification> specifications) {
		this.specifications = specifications;
	}

}
